-
Notifications
You must be signed in to change notification settings - Fork 1.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[5.9] Remove extra paths added to LD_LIBRARY_PATH on Linux when running tests #6691
[5.9] Remove extra paths added to LD_LIBRARY_PATH on Linux when running tests #6691
Conversation
These break running tests when there's already a swift on PATH that isn't the swift currently being run. There shouldn't be a need for these as the run path of the compiled binary is already the correct path (ie. the library path of the swift that built it and `$ORIGIN`). (cherry picked from commit 5c7db58)
I'm not sure that is actually true. When I introduced the workaround, the shipped nightly toolchain was broken which I think implies that the tests were passing despite that being the case. |
That's... odd. That's what the integration tests are for 🤔. Plus indexstore-db/sourcekit-lsp/etc are use the just built toolchain (that's where the tests were failing with this workaround). Do you know what was failing exactly? |
Not exactly. IIRC, I was basically not able to use |
@swift-ci please build toolchain |
@bnbarham does this need to be merged? |
We still need to make sure it doesn't cause the issue @neonichu mentioned above. |
@@ -141,16 +141,6 @@ enum TestingSupport { | |||
if let location = toolchain.xctestPath { | |||
env.prependPath("Path", value: location.pathString) | |||
} | |||
#elseif os(Linux) | |||
var libraryPaths = ["/usr/lib/swift/linux"] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This line is clearly wrong and should be removed no matter if the others are.
There were clearly issues with this repo when Swift is pre-installed in the If you want to remove this, you really need to make sure it's unneeded by adding some debug logging to some tests and checking that they're not building with the wrong toolchain or linking against the wrong runtime libraries. |
I haven't gone as far as to add debug logging here, but I have a 5.8 on PATH and using the downloaded toolchain with this patch:
With the latest 5.9 snapshot
|
I assume you mean |
Yes.
I already did, there's no mention of the 5.8 toolchain. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I just built and tested NIO with 5.8.1 in my PATH but using the latest trunk snapshot and didn't see anything wrong in the verbose log either. It's possible that subsequent pulls to swift-driver's Toolchain.lookup()
have made this testing block no longer needed.
I'm more concerned with the 5.8 PR that I haven't had a chance to validate yet. I suspect there's a good chance it still has whatever bug had caused this to be needed in the first place. If that's the case it'll need to be changed to add the path of the currently running |
@swift-ci please test |
@swift-ci please smoke test |
I wonder if we should just have "test" be an alias of "smoke test" at this point? It looks like "test" starts the Windows build but nothing else, so there's no reason to actually have "test" be a separate thing at this point, right? It's just unnecessary confusing. @tomerd wdyt? |
+1 |
Thanks for testing this @bnbarham, sounds like this should be good to merge, but we'll also need @tomerd and @airspeedswift at this point for 5.9 |
Will this need to use |
We will need both |
Heh, you must have commented on this just as I was putting up #6822 😅 (4 minutes apart apparently!) |
swift test
on Linux platforms